package com.heima.wemedia.config;

import com.heima.wemedia.interceptor.TokenInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @projectName: heima-leadnews
 * @package: com.heima.wemedia.config
 * @className: WebMvcConf
 * @author: 躺着认真玩
 * @description: 添加拦截器
 * @date: 2025/5/19 5:50
 * @version: 1.0
 */
@Configuration
public class WebMvcConf implements WebMvcConfigurer {
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new TokenInterceptor()).addPathPatterns("/**");
    }
}
